springboot应用程序中的java enable XFrameOptions标头(不含spring security)
安全团队测试了我们的应用程序,发现以下警告:
X-Frame-Options header is not included in the HTTP response to protect against 'ClickJacking' attacks.
我们在应用程序中使用spring boot,但不使用spring安全性。我们使用定制的安全机制
有没有办法将此标题添加到所有回复中
# 1 楼答案
您可以创建自定义筛选器并在其中设置标题: